package com.fangyu.lottery.model;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author fangyu
 * @version v1.0.0
 * @since 2025/8/28 13:32
 */
@Data
@AllArgsConstructor
public class LotteryResponse {
    private boolean success;
    private String message;
    private String code;
    private LotteryResult data;

    public static LotteryResponse success(LotteryResult data) {
        return new LotteryResponse(true, "成功", "SUCCESS", data);
    }

    public static LotteryResponse fail(String message, String code) {
        return new LotteryResponse(false, message, code, null);
    }
}